<?php
	/**<!--
		=================================================================================================
		Copyright (c) 2012 Athena Health. 
		This software is the proprietary information of Athena Health
		All Right Reserved.
		Repository path:    $HeadURL: http://athena-call-routing.googlecode.com/svn/trunk/search.php $
		Last committed:     $Revision: 45 $
		Last changed by:    $Author: davidjmorin@gmail.com $
		Last changed date:    $Date: 2012-07-02 21:10:12 -0400 (Mon, 02 Jul 2012) $
		ID:            $Id: index.php 45 2012-07-03 01:10:12Z davidjmorin@gmail.com $
		=================================================================================================
	-->**/
	
	mysql_connect ("localhost", "root","123456")  or die (mysql_error());
	mysql_select_db ("bbpinpal_article");
	
	$term = $_POST['term'];
	
	
	$sql = mysql_query("select * from athena where keyword like '%$term%'");
	
	echo "<table border='.5' color='#fff'>
	<tr>
	<th bgcolor='#66bef0'>Keyword</th>
	<th bgcolor='#66bef0'>Name</th>
	<th bgcolor='#66bef0'>Open</th>
	<th bgcolor='#66bef0'>Value</th>
	<th bgcolor='#66bef0'>% Change</th>
	<th bgcolor='#66bef0'>Date</th>
	</tr>";
	
	while($row = mysql_fetch_array($sql)){ 
		echo "<tr>";
		echo "<td bgcolor='#009933'>" . $row['sym'] . "</td>";
		echo "<td bgcolor='#009933'>" . $row['stock_name'] . "</td>";
		echo "<td bgcolor='#009933'>" . $row['open'] . "</td>";
		echo "<td bgcolor='#009933'>" . $row['stock_value'] . "</td>";
		echo "<td bgcolor='#009933'>" . $row['stock_perc'] . "</td>";
		echo "<td bgcolor='#009933'>" . $row['date'] . "</td>";
		echo "</tr>";
	}
	echo "</table>";
	
	
?>		